{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
			</dl>
		</div>
		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						下方是{{.title}}列表<br>
					</dt>
					<dd><a href="/admin/index/app_push_add"><button type="button" class="button">创建推送</button></a></dd>
				</dl>
			</div>
			<style>
				.tableselect{width: 22%;height: 40px;}
				.tableinput{border:1px #666 solid !important;width: 22%;height: 38px;padding-left: 5px}
				.pull{margin: 0 !important;}
			</style>
			<div class="release">
				<form>
					<dl>	
						<dt>
							<select name="uid" class="tableselect">
								<option value="">全部</option>
								{{range .table}}
								<option value="{{.id}}" {{if eq $.sysId .id}}selected{{end}}>{{.accountnumber}}</option>
								{{end}}
							</select>
							<input type="text" name="stime" placeholder="请选择开始时间" class="tableinput" readonly value="{{.stime}}">
							<input type="text" name="etime" placeholder="请选择结束时间" class="tableinput" readonly value="{{.etime}}">
							<input type="submit" class="button pull"></button>
						</dt>
					</dl>
				</form>

				</div>
			<!-- 会员列表 -->
			<table class="table">
				<thead><th>发送者</th><th>推送内容</th><th>推送时间</th><th>推送对象</th><th>操作</th></thead>
				{{range .info}}
				<tr id="{{.id}}">
					<td><img src="{{.pathname}}" class="img-2" style="margin-right: 10px" onerror="javascript:this.src='/static/img/admin/avatar.jpg'">{{.accountnumber}}</td>

					<td style="white-space: nowrap;overflow : hidden;text-overflow: ellipsis;max-width: 100px">
						{{.content}}
					</td>
					<td>
						{{.create_time}}
					</td>
					<td  style="overflow : hidden;text-overflow: ellipsis;white-space: nowrap;max-width: 1030px">
						{{if .user_group}}{{.user_name}}{{else}}全体会员{{end}}
					</td>
					<td class="operation" style="min-width: 80px">
						<a href="/admin/index/app_push_add?id={{.id}}">查看</a><br>
					</td>
				</tr>
				{{end}}
				{{if ne .paginator.totalpages 1}}
					<tr>
						<td  colspan="5">
							<div class="paging">
								{{if ne .paginator.currpage 1}}
								<a href="{{$.url}}page={{.paginator.firstpage}}">首页</a>
								<a href="{{$.url}}page={{.paginator.prevpage}}">&lt;&lt;</a>
								{{else}}
								<a class="disable">首页</a>
								<a class="disable">&lt;&lt;</a>
								{{end}}
								{{range $index,$page := .paginator.pages}}
								{{if eq $.paginator.currpage $page}} 
								<a class="no">{{$page}}</a>
								{{else}}
								<a href="{{$.url}}page={{$page}}">{{$page}}</a>
								{{end}}
								{{end}}
								{{if eq .paginator.currpage .paginator.totalpages}}
								<a class="disable">&gt;&gt;</a>
								<a class="disable">尾页</a>
								{{else}}
								<a href="{{$.url}}page={{.paginator.nextpage}}">&gt;&gt;</a>
								<a href="{{$.url}}page={{.paginator.totalpages}}">尾页</a>
								{{end}}
							</div>
						</td>
					</tr>
				{{end}}
			</table>
		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script>
	console.log({{.info}})
	$("input[name=stime]").jeDate({
	    isinitVal:false,
	    festival: false,
	    isToday:true, 
	    format: 'YYYY-MM-DD'
	});
	$("input[name=etime]").jeDate({
	    isinitVal:false,
	    festival: false,
	    isToday:true, 
	    format: 'YYYY-MM-DD'
	});
</script>
</body>
</html>
